package FrameWork;

import java.util.ArrayList;


// <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
// #[regen=yes,id=DCE.883BF885-7BFB-DD4F-3640-ABB2F28F41BF]
// </editor-fold> 
public class Room extends WEEObject {

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.E9024ABE-07D6-396F-FC77-FF4A8CDE9B2A]
    // </editor-fold> 
    private String roomName;

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.7F070251-57C5-906D-CE79-D20245A0520E]
    // </editor-fold> 
    private ItemTranslatorEngine itemTranslator;

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.0F840AA4-4C4E-6827-4A20-109422BEF701]
    // </editor-fold> 
    private ServiceGateway serviceGateway;

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.98B22553-5262-0AEC-7F02-FE4000B2BDB4]
    // </editor-fold> 
    private RoomCreatorEngine roomCreator;

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.14795011-2A06-30CD-51A2-2FF44E5545E6]
    // </editor-fold> 
    private UserCreatorEngine userCreator;

    // <editor-fold defaultstate="collapsed" desc=" UML Marker "> 
    // #[regen=yes,id=DCE.0EE8238B-3C72-27E1-7A8E-54B7B59399A9]
    // </editor-fold> 
    private ArrayList<WEEObject> mWEEObject;
    
    /*Number of ActiveUses in this room only*/
    private static int activeUsersNumbers;
    
    /*Number of Sub Rooms in this Room */
    private static int subRoomNumbers;
    
    
   
    public static void setActiveUsers(int activeUsers) {
        Room.activeUsersNumbers = activeUsers;
    }

    public static void setSubRoomNumbers(int subRoomNumbers) {
        Room.subRoomNumbers = subRoomNumbers;
    }
    
     public static void modifyActiveUsers(Boolean flag) {
         if(flag)
         {
             activeUsersNumbers++;
         }
         else
         {
             activeUsersNumbers--;
         }
    }

    public static void  modifySubRoomNumbers(Boolean flag) {
         if(flag)
         {
             subRoomNumbers++;
         }
         else
         {
             subRoomNumbers--;
         }
    }


    public static int getActiveUsers() {
        return activeUsersNumbers;
    }

    public static int getSubRoomNumbers() {
        return subRoomNumbers;
    }
    
    

    public Room()
    {
        
       itemTranslator = new ItemTranslatorEngine();
       serviceGateway = new ServiceGateway();
       roomCreator = new RoomCreatorEngine();
       userCreator = new UserCreatorEngine();
       mWEEObject = new ArrayList<WEEObject>();
    }
    public void insertWEEObject(WEEObject object)
    {
        mWEEObject.add(object);
    }
    
    public ItemTranslatorEngine getItemTranslator() {
        return itemTranslator;
    }

    public void setItemTranslator(ItemTranslatorEngine itemTranslator) {
        this.itemTranslator = itemTranslator;
    }

    public ArrayList<WEEObject> getMWEEObject() {
        return mWEEObject;
    }

    public void setMWEEObject(ArrayList<WEEObject> mWEEObject) {
        this.mWEEObject = mWEEObject;
    }

    public RoomCreatorEngine getRoomCreator() {
        return roomCreator;
    }

    public void setRoomCreator(RoomCreatorEngine roomCreator) {
        this.roomCreator = roomCreator;
    }

    public String getRoomName() {
        return roomName;
    }

    public void setRoomName(String roomName) {
        this.roomName = roomName;
    }

    public ServiceGateway getServiceGateway() {
        return serviceGateway;
    }

    public void setServiceGateway(ServiceGateway serviceGateway) {
        this.serviceGateway = serviceGateway;
    }

    public UserCreatorEngine getUserCreator() {
        return userCreator;
    }

    public void setUserCreator(UserCreatorEngine userCreator) {
        this.userCreator = userCreator;
    }
    
    @Override
    public void setID(int id) {
        super.setID(id);
    }
    
    

}

